/*
 * @Author: your name
 * @Date: 2022-01-19 15:40:07
 * @LastEditTime: 2022-02-21 18:50:57
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /saber/src/api/channel/channel.js
 */
import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/channel-bmg/channel/list',
    method: 'post',
    params: {
      current,
      size,
    },
    data:{
       ...params,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/channel-bmg/channel/commit/flow',
    method: 'post',
     data: {channel:{...row},updateDbType: "INSERT"}
  })
}

export const update = (row) => {
  return request({
    url: '/api/channel-bmg/channel/commit/flow',
    method: 'post',
    data: {channel:{...row},updateDbType: "UPDATE"}
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/channel-bmg/channel/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/channel/channel/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}


